#ifndef ASYNCHRONOUS_H
#define ASYNCHRONOUS_H


//WARNING: ASYNCHRONOUS FUNCTION IS DANGEROUS. THIS MAY COURSE UNPREDICABLE OR SERIOUS PROBLEM!
//YOU'D BETTER NOT USE THIS FUNCTION OR USE IT AT YOUR OWN RISK!!!

#include "system_config.h"
#include "event.h"
#include "soft_timer.h"


#define asynchronous_post(evt)								event_post(evt)
#define asynchronous_call(fn)									event_post(event_auto_register(fn,1))


#define delayed_post(evt, timeout)						soft_timer_start(soft_timer_auto_register(evt, 1), timeout)				
#define delayed_call(fn, timeout)							soft_timer_start(soft_timer_auto_register(event_auto_register(fn,1), 1), timeout)


#endif
